package com.lineage.server.serverpackets;

import com.lineage.server.model.Instance.L1PcInstance;

public class S_OwnCharStatus2 extends ServerBasePacket {
  private byte[] _byte;
  
  public S_OwnCharStatus2(L1PcInstance pc) {
    this._byte = null;
    if (pc == null)
      return; 
    buildPacket(pc);
  }
  
  private void buildPacket(L1PcInstance pc) {
    writeC(155);
    writeC(pc.getStr());
    writeC(pc.getInt());
    writeC(pc.getWis());
    writeC(pc.getDex());
    writeC(pc.getCon());
    writeC(pc.getCha());
    writeC(pc.getInventory().getWeight240());
  }
  
  public S_OwnCharStatus2(L1PcInstance pc, int str) {
    this._byte = null;
    writeC(155);
    writeC(str);
    writeC(pc.getInt());
    writeC(pc.getWis());
    writeC(pc.getDex());
    writeC(pc.getCon());
    writeC(pc.getCha());
    writeC(pc.getInventory().getWeight240());
  }
  
  public byte[] getContent() {
    if (this._byte == null)
      this._byte = getBytes(); 
    return this._byte;
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
